package com.kuang.abstractFactory;

import com.kuang.abstractFactory.factory.HuaWeiFatory;
import com.kuang.abstractFactory.factory.XiaomiFatory;
import com.kuang.abstractFactory.service.IComputerProduct;
import com.kuang.abstractFactory.service.IPhoneProduct;
import com.kuang.abstractFactory.service.IRouterProduct;

/**
 * @author zhaoxiang
 * @version 1.0
 * @description
 * @Date 2020/8/1 17:17
 */
public class AbstractFactoryClient {
    public static void main(String[] args) {
        System.out.println("======================小米系列产品======================");

        XiaomiFatory xiaomiFatory = new XiaomiFatory();
        IPhoneProduct iPhoneProduct = xiaomiFatory.iPhoneProduct();
        iPhoneProduct.startUp();
        iPhoneProduct.call();
        iPhoneProduct.sendSMS();
        iPhoneProduct.shutdown();


        IRouterProduct iRouterProduct = xiaomiFatory.iRouterProduct();
        iRouterProduct.startUp();
        iRouterProduct.connectionWifi();
        iRouterProduct.settings();
        iRouterProduct.shutdown();

        System.out.println("======================华为系列产品======================");
        HuaWeiFatory huaWeiFatory = new HuaWeiFatory();
        IPhoneProduct iPhoneProduct1 = huaWeiFatory.iPhoneProduct();
        iPhoneProduct1.startUp();
        iPhoneProduct1.call();
        iPhoneProduct1.sendSMS();
        iPhoneProduct1.shutdown();

        IRouterProduct iRouterProduct1 = huaWeiFatory.iRouterProduct();
        iRouterProduct1.startUp();
        iRouterProduct1.connectionWifi();
        iRouterProduct1.settings();
        iRouterProduct1.shutdown();

        IComputerProduct iComputerProduct = huaWeiFatory.iComputerProduct();
        iComputerProduct.sellComputer();
    }
}
